﻿<UserControl x:Class="SL4_NAV_ProjectiCON.Views.ForecastModel"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:ic="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions" xmlns:dataInput="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.Input"
    xmlns:converter="clr-namespace:SL4_NAV_ProjectiCON.Views"         
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">
    <UserControl.Resources>
        <converter:SliderForecastConverter x:Key="SliderForecastConverter" />
    </UserControl.Resources>
    <StackPanel x:Name="LayoutRoot" Height="150" HorizontalAlignment="Right" VerticalAlignment="Top" Width="371" Orientation="Horizontal" Loaded="LayoutRoot_Loaded" Background="White">
        <VisualStateManager.VisualStateGroups>
            <VisualStateGroup x:Name="VisualStateGroup">
                <VisualState x:Name="Top">
                    <Storyboard>
                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="TopConnector" Storyboard.TargetProperty="(UIElement.Visibility)">
                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                <DiscreteObjectKeyFrame.Value>
                                    <Visibility>Collapsed</Visibility>
                                </DiscreteObjectKeyFrame.Value>
                            </DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                </VisualState>
                <VisualState x:Name="MIddle">
                    <Storyboard>
                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="(FrameworkElement.VerticalAlignment)">
                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                <DiscreteObjectKeyFrame.Value>
                                    <VerticalAlignment>Center</VerticalAlignment>
                                </DiscreteObjectKeyFrame.Value>
                            </DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                </VisualState>
                <VisualState x:Name="Bottom">
                    <Storyboard>
                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="(FrameworkElement.VerticalAlignment)">
                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                <DiscreteObjectKeyFrame.Value>
                                    <VerticalAlignment>Bottom</VerticalAlignment>
                                </DiscreteObjectKeyFrame.Value>
                            </DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="BottomConnector" Storyboard.TargetProperty="(UIElement.Visibility)">
                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                <DiscreteObjectKeyFrame.Value>
                                    <Visibility>Collapsed</Visibility>
                                </DiscreteObjectKeyFrame.Value>
                            </DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                </VisualState>
                <VisualState x:Name="None">
                    <Storyboard>
                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(UIElement.Visibility)">
                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                <DiscreteObjectKeyFrame.Value>
                                    <Visibility>Collapsed</Visibility>
                                </DiscreteObjectKeyFrame.Value>
                            </DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="TopConnector" Storyboard.TargetProperty="(UIElement.Visibility)">
                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                <DiscreteObjectKeyFrame.Value>
                                    <Visibility>Collapsed</Visibility>
                                </DiscreteObjectKeyFrame.Value>
                            </DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="BottomConnector" Storyboard.TargetProperty="(UIElement.Visibility)">
                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                <DiscreteObjectKeyFrame.Value>
                                    <Visibility>Collapsed</Visibility>
                                </DiscreteObjectKeyFrame.Value>
                            </DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="ModelTitle" Storyboard.TargetProperty="(TextBlock.Text)">
                            <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="ModelTitle"/>
                        </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                </VisualState>
            </VisualStateGroup>
            <VisualStateGroup x:Name="Editable">
                <VisualState x:Name="Edit"/>
                <VisualState x:Name="ReadOnly">
                    <Storyboard>
                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.Opacity)">
                            <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Slider" Storyboard.TargetProperty="(UIElement.Opacity)">
                            <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                        </DoubleAnimationUsingKeyFrames>
                    </Storyboard>
                </VisualState>
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>
        <Canvas x:Name="LeftConnect" VerticalAlignment="Center" Width="50">
            <Rectangle Fill="#FF8AAAD8" Stroke="#FF8AAAD8" Height="5" Width="50"/>
        </Canvas>
        <StackPanel x:Name="Controls" Width="266">
            <StackPanel Margin="0,10,0,2" VerticalAlignment="Top" Orientation="Horizontal">
                <TextBlock x:Name="ModelTitle" HorizontalAlignment="Right" Width="125" FontSize="14.667" FontWeight="Bold" Text="Revenue" TextWrapping="Wrap"/>
                <TextBlock x:Name="Value" HorizontalAlignment="Left" Width="142" FontSize="14.667" TextWrapping="Wrap"/>
            </StackPanel>
            <Grid x:Name="grid" Height="15">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="0.33*"/>
                    <ColumnDefinition Width="0.33*"/>
                    <ColumnDefinition Width="0.33*"/>
                </Grid.ColumnDefinitions>
                <dataInput:Label x:Name="MinSlider" HorizontalAlignment="Left" Margin="2,0,0,0" VerticalAlignment="Top" Content="-30%"/>
                <dataInput:Label x:Name="Default" HorizontalAlignment="Center" Margin="0,0,0,-100" VerticalAlignment="Top" Grid.Column="1" Content="0%"/>
                <dataInput:Label x:Name="MaxSlider" HorizontalAlignment="Right" Margin="0,0,2,0" VerticalAlignment="Top" Grid.Column="2" Content="30%"/>
            </Grid>
            <Slider x:Name="Slider" Margin="0,1,0,0" Padding="0,1" Maximum="30" Minimum="-30" ValueChanged="Slider_ValueChanged"/>
            <ProgressBar x:Name="Progress" Height="15" Margin="3,2" Maximum="100" Value="50"/>
            <Grid Height="15" Margin="0,3,0,0" Opacity="0.6">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="0.33*"/>
                    <ColumnDefinition Width="0.33*"/>
                    <ColumnDefinition Width="0.33*"/>
                </Grid.ColumnDefinitions>
                <dataInput:Label x:Name="MinValue" HorizontalAlignment="Left" Margin="3,0,0,-100" VerticalAlignment="Top" Content="0"/>
                <dataInput:Label HorizontalAlignment="Center" Margin="0" VerticalAlignment="Top" Grid.Column="1" Content=""/>
                <dataInput:Label x:Name="MaxValue" HorizontalAlignment="Right" Margin="0,0,3,-100" VerticalAlignment="Top" Grid.Column="2" Content="100"/>
            </Grid>
        </StackPanel>
        <Canvas VerticalAlignment="Center" Width="50">
            <Rectangle x:Name="rectangle" Fill="#FF8AAAD8" Stroke="#FF8AAAD8" Height="5" Width="50"/>
            <Rectangle x:Name="TopConnector" Fill="#FF8AAAD8" Stroke="#FF8AAAD8" Height="90" Width="5" HorizontalAlignment="Right" Canvas.Left="45" Canvas.Top="-85"/>
            <Rectangle x:Name="BottomConnector" Fill="#FF8AAAD8" Stroke="#FF8AAAD8" Height="90" Width="5" HorizontalAlignment="Right" Canvas.Left="45"/>
        </Canvas>
    </StackPanel>
</UserControl>
